package com.xfcycle.zebrabikegp.activity;

import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageView;
import android.widget.TextView;

import com.xfcycle.zebrabikegp.R;
import com.xfcycle.zebrabikegp.util.AppInfoUtil;

public class AboutActivity extends RootActivity {

    private ImageView iv_about_back;
    private TextView tv_about_app_version;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_about);

        initView();
        initViewListener();
        setViewContent();
    }

    private void initView() {
        iv_about_back = (ImageView) findViewById(R.id.iv_about_back);
        tv_about_app_version = (TextView) findViewById(R.id.tv_about_app_version);
    }

    private void initViewListener() {
        iv_about_back.setOnClickListener(new OnClickListener() {

            @Override
            public void onClick(View v) {
                closeActivity();
            }
        });
    }

    private void setViewContent(){
        tv_about_app_version.setText(AppInfoUtil.getAPPVersion(this));
    }
}
